const regIdCard = (value) => {
  if (!value) {
    return "";
  }
  const reg = /^(.{4})(?:\d+)(.{2})$/; // 匹配身份证号前4位和后2位的正则表达式
  const maskedIdCard = value.replace(reg, "$1******$2"); // 身份证号脱敏，将中间8位替换为“*”
  return maskedIdCard;
};
const regPhone = (value) => {
  if (!value) {
    return "";
  }
  const reg = /(\d{3})\d{5}(\d{3})/; //  将手机号码中间5位用*号进行显示
  const maskedPhone = value.replace(reg, "$1****$2");
  return maskedPhone;
};
export default {
  regIdCard,
  regPhone,
};
